package org.example.com.pojo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
	private static final long serialVersionUID = 1L;

	private Integer id;
	private String phone;

	// 允许从请求体写入，但序列化（返回给前端）时不会包含 password
	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
	private String password;

	private String name;
	private String avatar;
	private LocalDateTime createdAt;
	private LocalDateTime updatedAt;
}